<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <link rel="stylesheet" th:href="@{/diaShop/css/common.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/diaShop/css/style.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/diaShop/fonts/iconfont.css}" type="text/css"/>
    <script th:src="@{/diaShop/js/jquery-1.9.1.min.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/jquery.SuperSlide.2.1.1.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/common_js.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/footer.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/lrtk.js}" type="text/javascript"></script>
    <title>订单列表</title>
</head>

<body>
<!--顶部图层-->
<div th:replace="diaShop/layout/mallHeader"></div>

<!--订单列表样式-->
<div class="user_style">
    <div class="user_center clearfix">
        <!--左侧菜单图层-->
        <div class="left_style">
            <div class="menu_style">
                <div class="user_title">用户中心</div>
                <div class="user_Head">
                    <div class="user_portrait">
                        <a class="btn_link" href="#" title="修改头像"></a> <img src="/diaShop/images/people.png"
                                                                            th:src="@{${user.img}}">
                        <div class="background_img"></div>
                    </div>
                    <div class="user_name">
                        <p><span class="name" th:text="${user.username}">化海天堂</span><a href="#">[修改密码]</a></p>
                        <p th:text="'访问时间'+${user.gmtModified}">访问时间：2016-1-21 10:23</p>
                    </div>
                </div>
                <!--菜单列表图层-->
                <dl class="accountSideOption1">
                    <dt class="transaction_manage"><em class="icon_1"></em>订单中心</dt>
                    <dd>
                        <ul>
                            <li><a th:href="@{'/person/diaShop/order'}">我的订单</a></li>
                            <li><a href="#" onclick="bna1('address',this)">收货地址</a></li>
                            <li><a href="#" onclick="bna1('coupon',this)">我的优惠卷</a></li>

                        </ul>
                    </dd>
                </dl>
                <dl class="accountSideOption1">
                    <dt class="transaction_manage"><em class="icon_2"></em>会员中心</dt>
                    <dd>
                        <ul>
                            <li><a th:href="@{'/person/diaShop/order'}">我的订单</a></li>
                            <li><a href="#" onclick="bna1('collect',this)">我的收藏</a></li>
                            <li><a href="#" onclick="bna1('reply',this)">我的评论</a></li>

                        </ul>
                    </dd>
                </dl>
                <dl class="accountSideOption1">
                    <dt class="transaction_manage"><em class="icon_3"></em>账户中心</dt>
                    <dd>
                        <ul>
                            <li><a href="user.php?act=bonus">我的红包</a></li>
                            <!--<a href="user.php?act=group_buy">我的团购</a>-->
                            <li><a href="user.php?act=track_packages"> 跟踪包裹</a></li>
                            <li><a href="user.php?act=account_log"> 资金管理</a></li>
                        </ul>
                    </dd>
                </dl>

            </div>
        </div>
        <!--右侧样式属性-->
        <div class="right_style">
            <div class="user_title_name"><span>订单列表</span></div>
            <div class="Order_Sort">
                <ul>
                    <li><a href="#" onclick="bna('9',this)"><img src="/diaShop/images/icon-dingdan1.png"/><br/>待付款</a>
                    </li>
                    <li><a href="#" onclick="bna('1',this)"><img src="/diaShop/images/icon-kuaidi.png"/></a><br/>待发货
                    </li>
                    <li><a href="#" onclick="bna('2',this)"><img
                            src="/diaShop/images/icon-weibiaoti101.png"/><br/>待收货</a></li>
                    <li><a href="#" onclick="bna('3',this)"><img src="/diaShop/images/icon-dingdan.png"/><br/>已完成</a>
                    </li>
                </ul>
            </div>
            <div class="Order_form_list">
                <table id="bna">
                    <thead>
                    <tr>
                        <td class="list_name_title0">商品</td>
                        <td class="list_name_title1">单价(元)</td>
                        <td class="list_name_title2">数量</td>
                        <td class="list_name_title4">实付款(元)</td>
                        <td class="list_name_title5">订单状态</td>
                        <td class="list_name_title6">操作</td>
                    </tr>
                    </thead>


                </table>
            </div>
        </div>
    </div>
</div>
<div th:replace="diaShop/layout/mallFooter"></div>
<script>
    bna(9);
    //精品、最新、全部课程
    function bna(type,obj) {
        var _timer = null;
        $(obj).addClass('banner_hover').siblings().removeClass('banner_hover');
        $.ajax({
            url :"/person/diaShop/ajax-order",
            data : {
                "status" : type
            },
            type : 'post',
            dataType : 'text',
            beforeSend:function(){
                clearTimeout(_timer);

            },
            success : function(result) {
                _timer = setTimeout(function(){
                    $("#bna").append(result);
                }, 300);
            }
        });
    }
    function addCart(goodsid){
        console.log(goodsid);
        var count=1;
        $.ajax({
            type: "post",
            url: '/person/diaShop/addCart',
            data: {
                goodsid:goodsid,
                count:count},
            dataType: "json",
            success:function(data) {
                if(data.code==0){
                    window.location.href = "/person/diaShop/likBuy/"+goodsid;
                }else if(data.success=='login'){
                    window.location.href = "/diaShop/login"
                }
            }
        });
    }
    function cancelOrder(orderid) {
        $.ajax({
            type: "post",
            url: '/person/diaShop/cancelOrder',
            data: {
                orderid:orderid
            },
            dataType: "json",
            success:function(data) {
                if(data.code==0){
                    layer.msg("取消订单成功!");
                }else if(data.success=='login'){
                    window.location.href = "/diaShop/login"
                }
            }
        });
    }



</script>
</body>
</html>
